package com.gwctv.context;

// ThreadLocal工具类
public class BaseContext {
    private static ThreadLocal<Long> threadLocal = new ThreadLocal();

    //存储id
    public static void setCurrentId(Long id){
        threadLocal.set(id);
    }

    //获取id
    public static Long getCurrentId(){
        return threadLocal.get();
    }

    //删除id
    public static void remove(){
        threadLocal.remove();
    }
}
